<?php
$i=1;
//debug($days);
?>
  <div class="contentCenter">
<h2 class="showNextDiv pointer"><?php __('Number of Forms per Type PRM05_KPI')  ?></h2>
<div class="isHidden">
    <table class="formstatus">
        <thead>
            <tr>
                <th><?php  __('Status') ?></th>
                <th><?php  __('Number') ?></th>
            </tr>
        </thead>
        <tbody>
            <?php foreach($types as $key => $val):  ?>
            <?php (($i%2)>0)?$cl='impair':$cl='pair';  ?>
            <tr class="<?php echo $cl  ?>">
                <?php if($key=='Total'):  ?>
                    <td class="total"><?php echo __($key,true)  ?></td>
                    <td class="total"><?php echo $val  ?></td>
                <?php else: ?>
                    <td><?php echo __($key,true)  ?></td>
                    <td><?php echo $val  ?></td>
                <?php  endif; ?>
            </tr>
            <?php $i++;endforeach;  ?>
        </tbody>
    </table>
</div>
<h2 class="showNextDiv pointer"><?php __('Number of Forms per month and per Type PRM05_KPI')  ?></h2>
<div class="isHidden">
    <div class="contentCenter">
    <?php  foreach($moisT as $m => $stats): ?>
    <h2 class="showNextDiv pointer"><?php echo ucfirst($m).' : '.$stats['Total'] ; ?></h2>
    <div class="isHidden">
        <table class="formstatus">
            <thead>
                <tr>
                    <th><?php  __('Status') ?></th>
                    <th><?php  __('Number') ?></th>
                </tr>
            </thead>
            <tbody>
                <?php foreach($stats as $key => $val):  ?>
                <?php (($i%2)>0)?$cl='impair':$cl='pair';  ?>
                <tr class="<?php echo $cl  ?>">
                    <?php if($key=='Total'):  ?>
                        <td class="total"><?php echo __($key,true)  ?></td>
                        <td class="total"><?php echo $val  ?></td>
                    <?php else: ?>
                        <td><?php echo __($key,true)  ?></td>
                        <td><?php echo $val  ?></td>
                    <?php  endif; ?>
                </tr>
                <?php $i++;endforeach;  ?>
            </tbody>
        </table>
    </div>
    <?php endforeach; ?>
    </div>
</div>
<h2 class="showNextDiv pointer"><?php __('Number of Forms per status')  ?></h2>
<div class="isHidden">
    <table class="formstatus">
        <thead>
            <tr>
                <th><?php  __('Status') ?></th>
                <th><?php  __('Number') ?></th>
            </tr>
        </thead>
        <tbody>
            <?php foreach($statuses as $key => $val):  ?>
            <?php (($i%2)>0)?$cl='impair':$cl='pair';  ?>
            <tr class="<?php echo $cl  ?>">
                <?php if($key=='Total'):  ?>
                    <td class="total"><?php echo __($key,true)  ?></td>
                    <td class="total"><?php echo $val  ?></td>
                <?php else: ?>
                    <td><?php echo __($key,true)  ?></td>
                    <td><?php echo $val  ?></td>
                <?php  endif; ?>
            </tr>
            <?php $i++;endforeach;  ?>
        </tbody>
    </table>
</div>
<h2 class="showNextDiv pointer"><?php __('Number of Forms per month and per status ')  ?></h2>
<div class="isHidden">
    <div class="contentCenter">
    <?php  foreach($mois as $m => $stats): ?>
    <h2 class="showNextDiv pointer"><?php echo ucfirst($m).' : '.$stats['Total'] ; ?></h2>
    <div class="isHidden">
        <table class="formstatus">
            <thead>
                <tr>
                    <th><?php  __('Status') ?></th>
                    <th><?php  __('Number') ?></th>
                </tr>
            </thead>
            <tbody>
                <?php foreach($stats as $key => $val):  ?>
                <?php (($i%2)>0)?$cl='impair':$cl='pair';  ?>
                <tr class="<?php echo $cl  ?>">
                    <?php if($key=='Total'):  ?>
                        <td class="total"><?php echo __($key,true)  ?></td>
                        <td class="total"><?php echo $val  ?></td>
                    <?php else: ?>
                        <td><?php echo __($key,true)  ?></td>
                        <td><?php echo $val  ?></td>
                    <?php  endif; ?>
                </tr>
                <?php $i++;endforeach;  ?>
            </tbody>
        </table>
    </div>
    <?php endforeach; ?>
    </div>
</div>
<h2 class="showNextDiv pointer"><?php __('Number of Employees per Jobprofile PRM04_KPI')  ?> </h2>
<div class="isHidden">
    <table class="formstatus">
        <thead>
            <tr>
                <th><?php  __('Job profile') ?></th>
                <th><?php  __('Number') ?></th>
            </tr>
        </thead>
        <tbody>
            <?php foreach($jobs as $key => $val):  ?>
            <?php (($i%2)>0)?$cl='impair':$cl='pair';  ?>
            <tr class="<?php echo $cl  ?>">
                <?php if($key=='Total'):  ?>
                    <td class="total"><?php echo __($key,true)  ?></td>
                    <td class="total"><?php echo $val  ?></td>
                <?php else: ?>
                    <td><?php echo __($key,true)  ?></td>
                    <td><?php echo $val  ?></td>
                <?php  endif; ?>
            </tr>
            <?php $i++;endforeach;  ?>
        </tbody>
    </table>
</div>
<h2 class="showNextDiv pointer"><?php __('Risks PRM06_KPI')  ?> </h2>
<div class="isHidden">
    <table class="formstatus">
        <thead>
            <tr>
                <th><?php  __('Risks') ?></th>
                <th><?php  __('Number') ?></th>
                <th><?php  __('Percent') ?></th>
            </tr>
        </thead>
        <tbody>
            <?php foreach($risks as $key => $val):  ?>
            <?php (($i%2)>0)?$cl='impair':$cl='pair';  ?>
            <tr class="<?php echo $cl  ?>">
                <td><?php echo __($key,true)  ?></td>
                <?php foreach($val as $n => $v):  ?>
                    
                    <td><?php echo $v  ?></td>

                <?php endforeach;  ?>
            </tr>
            <?php $i++;endforeach;  ?>
        </tbody>
    </table>
</div>
<h2 class="showNextDiv pointer"><?php __('Average Leadtime of process PRM09_KPI')  ?> </h2>
<div class="isHidden">
    <table class="formstatus">
        <thead>
            <tr>
                <th><?php  __('Leadtime') ?></th>
                <th><?php  __('Number') ?></th>
            </tr>
        </thead>
        <tbody>
            <?php foreach($days as $key => $val):  ?>
            <?php (($i%2)>0)?$cl='impair':$cl='pair';  ?>
            <tr class="<?php echo $cl  ?>">
                <td><?php echo __($key,true)  ?></td>
                <td><?php echo $val  ?></td>
            </tr>
            <?php $i++;endforeach;  ?>
        </tbody>
    </table>
</div>
</div>